Unlike the generation of truly random numbers, the generation of pseudo-random numbers always produces the same output pattern given the same input pattern. However, there are many applications in which truly random numbers are not required and in which pseudo-random numbers are sufficient. For example, pseudo-random numbers can be used to generate test patterns for a data processing system. Pseudo-random numbers can also be used to represent noise in a data processing system. Additionally, pseudo-random numbers can be used to generate an initial state or value which acts as a pseudo-random starting point from which to start calculations. Some neural network systems require this type of pseudo-random starting point from which to start calculations. In addition, pseudo-random numbers may be used in data encryption and decryption. There are also other uses for pseudo-random numbers.
Existing pseudo-random number generators commonly use a linear-feedback shift-register (LFSR) to generate pseudo-random numbers. An LFSR is a multi-stage shift-register with feedback connections via exclusive-OR (XOR) gates. Outputs of the last stage and some intermediate stages are tapped and fed back to the first stage via XOR-gates. The first and last stages being the leftmost and rightmost bit-positions, respectively, if the register shifts left-to-right. In existing LFSRs, the polynomial which is used to generate the pseudo-random numbers is determined by the hardwired feedback connections from the various stages of the LFSR.
Existing pseudo-random number generators have the characteristic that the sequence of numbers produced by the generator will eventually repeat. Thus the "sequence" is the series of pseudo-random numbers which are generated before any repetition occurs. The "run length" is the number of pseudo-random numbers which are included in a sequence. For example, if a pseudo-random number generator generates the following pattern: 2, 6, 1, 2, 6, 1, 2, 6, 1; then the sequence would be 2, 6, 1. The run length would be three, because there are three numbers in the sequence. Note that increasing the run length improves the "randomness" of the pattern by ensuring that the sequence does not repeat as frequently.